package LDVH.factories;

import LDVH.itf.IGestObjetsFactory;
import LDVH.itf.ILivre;
import LDVH.livre.GestLivre;

public class LivreFactory {
	private static ILivre instance;
	private static final IGestObjetsFactory objFactory = new GestObjetsFactory();
        
	public static ILivre getLivre() {
		if (instance == null)
			instance = new GestLivre(objFactory);
		return instance;
	}
        
        public static void loadLivre(ILivre livre) {
            if (instance == null)
                instance = livre;
        }
        
        public static void destroyLivre() {
            instance = null;
        }
}
